This invention originates from a need to dynamically update files that are available for access in a manner that preserves data integrity and that minimizes delays in conveying information to a system user. File updates usually take place dynamically. Dynamic file updates are desirable because a file is updated when and as needed. For example, a file can be updated when scheduled, when new information becomes available, or when requested.
This need can arise in the context of updating files in a networked environment, such as an internetwork or the Internet, where multiple computers have the ability to interact with one another and the ability to access some of the same system resources, such as files (comprising, for example, data or program code) and devices by virtue of being connected to one another via communications facilities. For example, every computer that is connected to a local area network (LAN) is connected by a communications link that enables any computer on the LAN to interact with any other computer on the LAN, via e-mail for instance, and to access the same data, such as an employee address book. Also, computers that are connected to the Internet are connected by gateways which enable computers to communicate with one another, such as via e-mail, and to share some of the same system resources, such as files comprising documents found on a Web page, and files comprising programs such as a search engine. In these systems described, changes made to a file (or files) on any one computer will necessarily affect at least one computer (if not all) in the system. For instance, when the price of a stock, StockA, changes, a file, StockFile comprising stock prices is modified to reflect StockA's new price. When this happens, all computers which access StockFile are affected by the modification to StockFile, i.e., those computers can access StockA's new price.
This need can also arise in the context of updating files in a single computer environment, such as on a personal computer. For example, suppose that a user has a subset of a legal database of annotated statutes (where the subset comprises annotated family law statutes, for example) loaded on a personal computer, and that an updated legal CD-ROM database (comprising all types of annotated statutes, for example) is provided on a quarterly basis. Since the entire database can consume valuable disk space, and since the user only needs a subset of the database, the user can request updated information on an as-needed basis. In this scenario, the user could pull up a child support statute from the database on the personal computer. Wanting to know if recent court cases have cited this statute, the user selects a Refresh button in the window display of the legal database program to access new database information from the CD-ROM.
In both contexts, it is vital that information in the files remain accurate. Moreover, it is desirable that new information become available to a user as soon as possible, and that a user is not prevented from accessing a file while it is updated. For example, in an operating system, a file update is traditionally implemented by locking the file to block access to it, updating the file, and then unlocking the file. On a web site, a file update is usually implemented by shutting down the web site. While the "lockout" method provides users with the current information (i.e., data or code), and accurate information, at least one drawback is that information flow is interrupted because the file being updated can't be accessed during the update process.
One alternative is to give users access to the file while it is being updated. The disadvantage of this method is that it can result in corrupt information if the file is being written to and read simultaneously. Furthermore, it can result in a user receiving inconsistent information if a file is updated during a user's session such that the user sees one set of information before the file update, and another set of information after the file update.
Another alternative is to use a database to implement file updates, rather than traditional direct file access as described above. When a database is used, it is used with schema (a description of a database that defines aspects of the database) and API's (application program interface, or a set of routines that direct the performance of procedures by the computer's operating system). While data consistency and data integrity are maintained using a database, this approach requires significantly more system resources. Furthermore, any web sites which are built around CGI (an acronym for Common Gateway Interface which is a specification that defines communications between information servers and the server's host computer), and direct file access require massive rework to conform with database access standards and protocol.
A need exists, therefore, for an apparatus and method dynamically updating files while they are available for access, such that delay of information is minimized, and system resources are not compromised.